<?php


namespace app\admin\validate;


use think\Validate;

class AddAuth extends Validate
{
    protected $rule = [
        'username' => 'require|max:50',
        'newpass' => 'require|min:6|max:16',
        'repass' => 'require|min:6|max:16|confirm:newpass'
    ];

    protected $message = [
        'username.require' => '用户名必填',
        'username.max' =>'输入格式不正确',
        'newpass.require' => '新密码必填',
        'newpass.min' => '新密码至少6字符',
        'newpass.max' => '新密码至多16字符',
        'repass.require' => '确认密码必填',
        'repass.min' => '确认密码至少6字符',
        'repass.max' => '确认密码至多16字符',
        'repass.confirm' => '确认密码和密码不一致'
    ];
}